﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AuthCenter.Token.Pin
{
    public class PinGen
    {
        public static string MakePIN(int length = 6)
        {
            Random random = new Random();
            StringBuilder sb = new StringBuilder(length);

            for (int i = 0; i < length; i++)
            {
                sb.Append(random.Next(10)); // 生成0-9的随机数
            }

            return sb.ToString();
        }
    }
}
